package top.v5it.japi.plus.support.idcenter;

import cn.hutool.extra.spring.SpringUtil;

import java.util.Objects;

/**
 * id生成器工厂
 *
 * @author zhanpu
 * @date 2021/3/14
 */
public class IdCenterFactory {

    /**
     * 获取id生成器
     *
     * @return
     */
    public static IdCenter getIdCenter() {
        IdCenter idCenter = SpringUtil.getBean(IdCenter.class);
        Objects.requireNonNull(idCenter, "IdCenter is null");

        return idCenter;
    }

}
